]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
endSessionDialog: Immediately return from Open()
authorAdrian Vovk <adrianvovk@gmail.com>
Tue, 20 Jan 2026 05:09:29 +0000 (00:09 -0500)
committerFlorian Müllner <fmuellner@gnome.org>
Sat, 14 Mar 2026 17:42:12 +0000 (18:42 +0100)
There's no need to wait for the dialog to finish fading in before we can
return from Open().

The code, as it was before, would break dialog updates: the dialog was
already open, so the signal would never get emitted, so the method would
never return, and so gnome-session would remain blocked waiting for a
return value that will never come.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/4040>
(cherry picked from commit 6b482e1720cb373b8a66146f16ffc9d2e49a7c52)

js/ui/endSessionDialog.js

index 7be3070235c280b51539cb16e7c3bf55754d0419..2e69da39094ad7da0b8d25ca49300f127a9ed57e 100644 (file)
@@ -785,10 +785,7 @@ class EndSessionDialog extends ModalDialog.ModalDialog {
 
         this._sync();
 
-        let signalId = this.connect('opened', () => {
-            invocation.return_value(null);
-            this.disconnect(signalId);
-        });
+        invocation.return_value(null);
     }
 
     Close(_parameters, _invocation) {